//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

namespace Microsoft.Research.eResearch.Subscriber.Interfaces
{
    using System;
    using Microsoft.Research.eResearch.Blackboard.Common;

    /// <summary>
    /// Implementers of this interface provide code that allows the
    /// subscriber to notify the Blackboard of changes to its subscription
    /// profile.
    /// </summary>
    public interface INotificationSubscriptionSender
    {
        /// <summary>
        /// Subscribes the specified return address of the subscriber using the specified
        /// subscription profile to the Blackboard.  If the subscriber has previous subscribed 
        /// to the blackboard, calling Subscribe again will update (change) the subscriber's 
        /// subscription profile (i.e. Subscribe can be called any number of times before 
        /// calling Unsubscribe).
        /// </summary>
        /// <param name="returnAddress">The return address of the subscriber.</param>
        /// <param name="profile">The subscription profile.</param>
        void Subscribe(Uri returnAddress, SubscriptionProfile profile);

        /// <summary>
        /// Unsubscribes the specified return address of the subscriber from the Blackboard.
        /// </summary>
        /// <param name="returnAddress">The return address of the subscriber.</param>
        void Unsubscribe(Uri returnAddress);
    }
}
